/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.buzzwords.factories;

import com.buzzwords.behaviors.BuzzwordCustomBehavior;
import com.buzzwords.behaviors.BuzzwordKeyBehavior;
import com.buzzwords.behaviors.BuzzwordWordBehavior;
import com.buzzwords.behaviors.DatabaseBehavior;
import com.buzzwords.behaviors.DefinitionKeyBehavior;
import com.buzzwords.behaviors.UserUDIDBehavior;
import com.buzzwords.dataacess.Database;
import com.buzzwords.dataacess.DatabaseDAO;

/**
 *
 * @author potlow
 */
public class BuzzwordDatabaseFactory extends DatabaseFactory {

    public final static int USER_UDID = 0;
    public final static int BUZZWORD_CUSTOM = 1;
    public final static int BUZZWORD_WORD = 2;
    public final static int BUZZWORD_KEY = 3;
    public final static int DEFINITION_KEY = 4;

    @Override
    protected DatabaseBehavior createDatabaseBehavior(int type) {
        switch (type) {
            case USER_UDID:
                return new UserUDIDBehavior();
            case BUZZWORD_CUSTOM:
                return new BuzzwordCustomBehavior();
            case BUZZWORD_WORD:
                return new BuzzwordWordBehavior();
            case BUZZWORD_KEY:
                return new BuzzwordKeyBehavior();
            case DEFINITION_KEY:
                return new DefinitionKeyBehavior();
            default:
                return null;
        }
    }

    @Override
    protected Database createDatabase() {
        return new DatabaseDAO();
    }
}
